﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ShareB.Models.MetaFieldModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	CreateMeta
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>CreateMeta</h2>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Fields</legend>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.FieldName) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.FieldName) %>
                <%: Html.ValidationMessageFor(model => model.FieldName) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.FieldType) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.FieldType) %>
                <%: Html.ValidationMessageFor(model => model.FieldType) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Locked) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.Locked, 
                                        new SelectList(new[]
                                        {
                                            new SelectListItem { Text = "False", Value = "False" },
                                            new SelectListItem { Text = "True", Value = "True" },
                                        }, "Text", "Value")) %>
                <%: Html.ValidationMessageFor(model => model.Locked) %>
            </div>
            
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Cancel", "ManageFields") %>
    </div>

</asp:Content>

